package com.feilong.edgeAI.speech.util;

import android.content.Context;
import android.media.MediaPlayer;

import com.feilong.edgeAI.R;


public class PlayerUtils {
    private MediaPlayer mediaPlayer;

    public void initPlayer(Context context){
        mediaPlayer = MediaPlayer.create(context,
                R.raw.uds_ret);
    }

    public void play(){
        mediaPlayer.setLooping(false);//音乐的循环播放
        mediaPlayer.start();
    }
    public void release(){
        try{

            mediaPlayer.release();
        }catch (Exception e){

        }
    }
}
